import React, {MouseEventHandler} from 'react';
import { Popconfirm, message } from 'choerodon-ui';

const PopconfirmBasic: React.FC = () => {

  const handleConfirm:MouseEventHandler<HTMLButtonElement> = () => {
    message.success('Click on Yes');
  };

  const handleCancel:MouseEventHandler<HTMLButtonElement> = () => {
    message.success('Click on No');
  };

  return (
    <div>
      <Popconfirm
        title="Are you sure delete this task?"
        onConfirm={handleConfirm}
        onCancel={handleCancel}
        okText="Yes"
        cancelText="No"
      >
        <a href="#">Delete</a>
      </Popconfirm>
    </div>
  );
};

export default PopconfirmBasic;